<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>QRCode</title>
  <script type="text/javascript" src="js/main.js"></script>
  <script type="text/javascript">
    $(document).ready(function (){
      var qrcode = new QRCode("qrcodeTest", {
        text: "测试",
        //设置渲染方式
        render: "canvas",
        //计算模式
        typeNumber: -1,
        width: 128,
        height: 128,
        colorDark: "#f80000",
        colorLight: "#ffffff",
        // 容错级别，可设置为(QRCode.CorrectLevel.)：L M Q H (7% 15% 25% 30%)
        correctLevel: QRCode.CorrectLevel.H
      });
      // 清除
      qrcode.clear();
      // 修改二维码
      qrcode.makeCode("修改");
    })
  </script>
</head>
<body>
  <div id="qrcodeTest"></div>
</body>
</html>